Optimal. Leaf size=140 \[ -\frac {1}{4} d \log \left (x^2-x+1\right )+\frac {1}{4} d \log \left (x^2+x+1\right )+\frac {d x \left (1-x^2\right )}{6 \left (x^4+x^2+1\right )}-\frac {d \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {d \tan ^{-1}\left (\frac {2 x+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 e \tan ^{-1}\left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {e \left (2 x^2+1\right )}{6 \left (x^4+x^2+1\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 17, number of rules used = 10, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {1673, 12, 1092, 1169, 634, 618, 204, 628, 1107, 614} \[ \frac {d x \left (1-x^2\right )}{6 \left (x^4+x^2+1\right )}-\frac {1}{4} d \log \left (x^2-x+1\right )+\frac {1}{4} d \log \left (x^2+x+1\right )-\frac {d \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {d \tan ^{-1}\left (\frac {2 x+1}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {e \left (2 x^2+1\right )}{6 \left (x^4+x^2+1\right )}+\frac {2 e \tan ^{-1}\left (\frac {2 x^2+1}{\sqrt {3}}\right )}{3 \sqrt {3}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 204
Rule 614
Rule 618
Rule 628
Rule 634
Rule 1092
Rule 1107
Rule 1169
Rule 1673
Rubi steps
\begin {align*} \int \frac {d+e x}{\left (1+x^2+x^4\right )^2} \, dx &=\int \frac {d}{\left (1+x^2+x^4\right )^2} \, dx+\int \frac {e x}{\left (1+x^2+x^4\right )^2} \, dx\\ &=d \int \frac {1}{\left (1+x^2+x^4\right )^2} \, dx+e \int \frac {x}{\left (1+x^2+x^4\right )^2} \, dx\\ &=\frac {d x \left (1-x^2\right )}{6 \left (1+x^2+x^4\right )}+\frac {1}{6} d \int \frac {5-x^2}{1+x^2+x^4} \, dx+\frac {1}{2} e \operatorname {Subst}\left (\int \frac {1}{\left (1+x+x^2\right )^2} \, dx,x,x^2\right )\\ &=\frac {d x \left (1-x^2\right )}{6 \left (1+x^2+x^4\right )}+\frac {e \left (1+2 x^2\right )}{6 \left (1+x^2+x^4\right )}+\frac {1}{12} d \int \frac {5-6 x}{1-x+x^2} \, dx+\frac {1}{12} d \int \frac {5+6 x}{1+x+x^2} \, dx+\frac {1}{3} e \operatorname {Subst}\left (\int \frac {1}{1+x+x^2} \, dx,x,x^2\right )\\ &=\frac {d x \left (1-x^2\right )}{6 \left (1+x^2+x^4\right )}+\frac {e \left (1+2 x^2\right )}{6 \left (1+x^2+x^4\right )}+\frac {1}{6} d \int \frac {1}{1-x+x^2} \, dx+\frac {1}{6} d \int \frac {1}{1+x+x^2} \, dx-\frac {1}{4} d \int \frac {-1+2 x}{1-x+x^2} \, dx+\frac {1}{4} d \int \frac {1+2 x}{1+x+x^2} \, dx-\frac {1}{3} (2 e) \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+2 x^2\right )\\ &=\frac {d x \left (1-x^2\right )}{6 \left (1+x^2+x^4\right )}+\frac {e \left (1+2 x^2\right )}{6 \left (1+x^2+x^4\right )}+\frac {2 e \tan ^{-1}\left (\frac {1+2 x^2}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {1}{4} d \log \left (1-x+x^2\right )+\frac {1}{4} d \log \left (1+x+x^2\right )-\frac {1}{3} d \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x\right )-\frac {1}{3} d \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+2 x\right )\\ &=\frac {d x \left (1-x^2\right )}{6 \left (1+x^2+x^4\right )}+\frac {e \left (1+2 x^2\right )}{6 \left (1+x^2+x^4\right )}-\frac {d \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {d \tan ^{-1}\left (\frac {1+2 x}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {2 e \tan ^{-1}\left (\frac {1+2 x^2}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {1}{4} d \log \left (1-x+x^2\right )+\frac {1}{4} d \log \left (1+x+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.49, size = 146, normalized size = 1.04 \[ \frac {d \left (x-x^3\right )+2 e x^2+e}{6 \left (x^4+x^2+1\right )}-\frac {\left (\sqrt {3}-11 i\right ) d \tan ^{-1}\left (\frac {1}{2} \left (\sqrt {3}-i\right ) x\right )}{6 \sqrt {6+6 i \sqrt {3}}}-\frac {\left (\sqrt {3}+11 i\right ) d \tan ^{-1}\left (\frac {1}{2} \left (\sqrt {3}+i\right ) x\right )}{6 \sqrt {6-6 i \sqrt {3}}}-\frac {2 e \tan ^{-1}\left (\frac {\sqrt {3}}{2 x^2+1}\right )}{3 \sqrt {3}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.09, size = 154, normalized size = 1.10 \[ -\frac {6 \, d x^{3} - 12 \, e x^{2} - 4 \, \sqrt {3} {\left ({\left (d - 2 \, e\right )} x^{4} + {\left (d - 2 \, e\right )} x^{2} + d - 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) - 4 \, \sqrt {3} {\left ({\left (d + 2 \, e\right )} x^{4} + {\left (d + 2 \, e\right )} x^{2} + d + 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) - 6 \, d x - 9 \, {\left (d x^{4} + d x^{2} + d\right )} \log \left (x^{2} + x + 1\right ) + 9 \, {\left (d x^{4} + d x^{2} + d\right )} \log \left (x^{2} - x + 1\right ) - 6 \, e}{36 \, {\left (x^{4} + x^{2} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 100, normalized size = 0.71 \[ \frac {1}{9} \, \sqrt {3} {\left (d - 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{9} \, \sqrt {3} {\left (d + 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{4} \, d \log \left (x^{2} + x + 1\right ) - \frac {1}{4} \, d \log \left (x^{2} - x + 1\right ) - \frac {d x^{3} - 2 \, x^{2} e - d x - e}{6 \, {\left (x^{4} + x^{2} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 146, normalized size = 1.04 \[ \frac {\sqrt {3}\, d \arctan \left (\frac {\left (2 x +1\right ) \sqrt {3}}{3}\right )}{9}+\frac {\sqrt {3}\, d \arctan \left (\frac {\left (2 x -1\right ) \sqrt {3}}{3}\right )}{9}-\frac {d \ln \left (x^{2}-x +1\right )}{4}+\frac {d \ln \left (x^{2}+x +1\right )}{4}-\frac {2 \sqrt {3}\, e \arctan \left (\frac {\left (2 x +1\right ) \sqrt {3}}{3}\right )}{9}+\frac {2 \sqrt {3}\, e \arctan \left (\frac {\left (2 x -1\right ) \sqrt {3}}{3}\right )}{9}+\frac {-\frac {2 d}{3}+\frac {e}{3}+\left (-\frac {d}{3}-\frac {e}{3}\right ) x}{4 x^{2}+4 x +4}-\frac {-\frac {2 d}{3}-\frac {e}{3}+\left (\frac {d}{3}-\frac {e}{3}\right ) x}{4 \left (x^{2}-x +1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 2.42, size = 96, normalized size = 0.69 \[ \frac {1}{9} \, \sqrt {3} {\left (d - 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{9} \, \sqrt {3} {\left (d + 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{4} \, d \log \left (x^{2} + x + 1\right ) - \frac {1}{4} \, d \log \left (x^{2} - x + 1\right ) - \frac {d x^{3} - 2 \, e x^{2} - d x - e}{6 \, {\left (x^{4} + x^{2} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.25, size = 149, normalized size = 1.06 \[ \frac {-\frac {d\,x^3}{6}+\frac {e\,x^2}{3}+\frac {d\,x}{6}+\frac {e}{6}}{x^4+x^2+1}-\ln \left (x-\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {d}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{18}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{9}\right )+\ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {d}{4}-\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{18}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{9}\right )+\ln \left (x-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (-\frac {d}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{18}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{9}\right )+\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {d}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{18}-\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{9}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [C] time = 3.49, size = 952, normalized size = 6.80 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________